﻿<phone:PhoneApplicationPage x:Class="dIRca.WP7.Views.AboutView"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
                            xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:blend="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
                            xmlns:command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP7"
                            xmlns:contrib="clr-namespace:WP7Contrib.View.Controls;assembly=WP7Contrib.View.Controls"
                            xmlns:behaviors="clr-namespace:WP7Contrib.View.Controls.Behaviors;assembly=WP7Contrib.View.Controls"
                            mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696" 
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            SupportedOrientations="PortraitOrLandscape"
                            Orientation="Portrait"
                            shell:SystemTray.IsVisible="True"
                            DataContext="{Binding AboutViewModel, Source={StaticResource Locator}}">

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>    
    <Grid x:Name="LayoutRoot"
          Background="{StaticResource PhoneBackgroundBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <StackPanel Name="TitlePanel"
                    Grid.Row="0"
                    Margin="24,24,0,12">
            <TextBlock Name="textBlockPageTitle"
                       Text="{Binding PageTitle}"
                       Style="{StaticResource PageTitleStyle}" />
        </StackPanel>

        <Grid x:Name="ContentGrid"
              Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="60"/>
                <RowDefinition Height="60"/>
                <RowDefinition Height="60"/>
                <RowDefinition Height="60"/>
                <RowDefinition Height="60"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120*"/>
                <ColumnDefinition Width="320*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Name="textBlockAuthorLabel"
                       Text="Author:"
                       Style="{StaticResource TextNormalStyle}"
                       Grid.Row="0" />
            <TextBlock Name="textBlockVersionLabel"
                       Text="Version:"
                       Style="{StaticResource TextNormalStyle}"
                       Grid.Row="1" />
            <TextBlock Name="textBlockProjectUrlLabel"
                       Text="Project Url:"
                       Style="{StaticResource TextNormalStyle}"
                       Grid.Row="2" />
            <TextBlock Name="textBlockTwitterUrlLabel"
                       Text="Twitter Url:"
                       Style="{StaticResource TextNormalStyle}"
                       Grid.Row="3" />
            <TextBlock Name="textBlockAuthor"
                       Text="{Binding Author}"
                       Style="{StaticResource TextNormalStyle}"
                       Grid.Column="1" />
            <TextBlock Name="textBlockVersion"
                       Text="{Binding Version}"
                       Style="{StaticResource TextNormalStyle}"
                       Grid.Column="1" Grid.Row="1" />
            <HyperlinkButton Name="hyperlinkButtonProjectUrl"
                             HorizontalContentAlignment="Left"
                             Style="{StaticResource HyperlinkButtonContentStyle}"
                             Grid.Column="1" Grid.Row="2">
                <blend:Interaction.Triggers>
                    <blend:EventTrigger EventName="Click">
                        <command:EventToCommand Command="{Binding GoToProjectUrlCommand}" />
                    </blend:EventTrigger>
                </blend:Interaction.Triggers>
                <TextBlock Style="{StaticResource TextNormalStyle}"
                           Text="{Binding ProjectUrl}"
                           TextWrapping="Wrap"
                           TextDecorations="Underline" />
            </HyperlinkButton>
            <HyperlinkButton Name="hyperlinkButtonTwitterUrl"
                             HorizontalContentAlignment="Left"
                             Style="{StaticResource HyperlinkButtonContentStyle}"
                             Grid.Row="3" Grid.Column="1">
                <blend:Interaction.Triggers>
                    <blend:EventTrigger EventName="Click">
                        <command:EventToCommand Command="{Binding GoToTwitterUrlCommand}" />
                    </blend:EventTrigger>
                </blend:Interaction.Triggers>
                <TextBlock Style="{StaticResource TextNormalStyle}"
                           Text="{Binding TwitterUrlName}"
                           TextWrapping="Wrap"
                           TextDecorations="Underline" />
            </HyperlinkButton>
        </Grid>
    </Grid>
</phone:PhoneApplicationPage>